package com.gimi.cloud.jimi.manage.consumer.service.prod;

import com.gimi.cloud.jimi.common.exception.MsgException;
import com.gimi.cloud.jimi.common.utils.reqhead.Response;
import org.springframework.web.bind.annotation.RequestBody;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * Created by lixj on 2017/12/18.
 */
public interface CategoryService {

    /**
     * 获取商品品类列表
     * @return 菜单列表
     */
    public Response getCategoryList(@RequestBody String requestBody, HttpServletRequest request, HttpServletResponse response);

    /**
     * 添加商品品类
     * @param requestBody
     * @param request
     * @param response
     */
    public Response addCategory(String requestBody, HttpServletRequest request, HttpServletResponse response) throws MsgException;

    /**
     * 更新商品品类
     * @param requestBody
     * @param request
     * @param response
     */
    public Response updateCategory(String requestBody, HttpServletRequest request, HttpServletResponse response) throws MsgException;

    /**
     * 删除商品品类
     * @param requestBody
     * @param request
     * @param response
     */
    public Response deleteCategory(String requestBody, HttpServletRequest request, HttpServletResponse response);
    /**
     * 获取商品品类列表(分页)
     * @return 菜单列表
     */
    public Response getCategoryPageList(String requestBody, HttpServletRequest request, HttpServletResponse response) throws MsgException;

//    /**
//     * 转跳到编辑商品品类界面
//     * @return
//     */
//    public void gotoEditProdCategory(String requestData, HttpServletRequest request, HttpServletResponse response) throws MsgException;

    /**
     * 转跳到编辑商品品类界面（新）
     * @return
     */
    public Response loadPordCategoryAndInitModelInfo(String requestData, HttpServletRequest request, HttpServletResponse response) throws MsgException;

    /**
     * 查询三级品类详情
     * @return
     */
    public Response getThreeProdCatModel(String requestData, HttpServletRequest request, HttpServletResponse response) throws MsgException;

    /**
     * 根据参数查询出所有的对应商品品类列表
     * @param requestData
     * @param request
     * @param response
     */
    Response searchCategoryListByGrade(String requestData, HttpServletRequest request, HttpServletResponse response);
    /**
     * 品类logo图片上传
     * @return url
     */
    Response fileUpload(HttpServletResponse response, HttpServletRequest request) throws Exception;

    /**
     * 获得树形结构的商品品类列表
     * @return
     */
    Response getCategoryListTree(String requestData, HttpServletRequest request, HttpServletResponse response);

    /**
     * 根据父分类获取子分类列表，深度为1
     */
    Response getCategoryListByParent(String requestData, HttpServletRequest request, HttpServletResponse response);

}
